DO WHILE PATNATM=SPACE(16) .AND. PATNATF=SPACE(16)
   STORE 0 TO CNT,CR,cnt1,cr1
   SELE 4
   SET EXCLU OFF
   use &dr&f4 inde &dr&f4
   natio=space(5)
   do boxem with 13,3,'Enter Initial of Country Name : ','natio','N','BG','W+','N',5,.T.,.T.
   if natio=space(5) .or. lastkey()=27
      return
   endif
   lyrx=savescreen(0,0,24,79)

*   GO TOP
   seek alltrim(natio)
   do while alltrim(country)=alltrim(natio) .and. .NOT. EOF()
      CNT=CNT+1
      skip
   ENDDO
   if cnt=0
      return
   endif
   if cnt<10
      cntx=cnt+1
   else
      cntx=11
   endif

   DECLARE FLN[CNT]
   DECLARE KDN[CNT]
   DECLARE PAM[CNT]
   DECLARE PAF[CNT]
   SELE 4
   GO TOP
   seek alltrim(natio)
*   do while .NOT. EOF()
   do while alltrim(country)=alltrim(natio) .and. .NOT. EOF()
*      IF NAT_FRE='1'
         CR=CR+1
         FLN[CR]=+COUNTRY+' '+CITIZENM
         KDN[CR]=NAT_CODE
         PAM[CR]=CITIZENM
         PAF[CR]=CITIZENF
*      ENDIF
      SKIP
   ENDDO
   INKEY()
   set colo to w+/r,gr+/r

*   @ 12,44 clea to 23,77
*   @ 12,44 to 23,77 double

   @ 12,44 clea to 12+cntx,77
   @ 12,44 to 12+cntx,77 double


   pilih=achoice(13,46,22,75,FLN)
   IF LASTKEY()=13
      FILD=FLN[PILIH]
      NATK=KDN[PILIH]
      PATNATM=PAM[PILIH]
      PATNATF=PAF[PILIH]
   else
      IF LASTKEY()=27
         DO INPNATIO
         restscreen(0,0,24,79,lyrx)
      ELSE
         set cons off
         wait ' '
         set cons on
         restscreen(0,0,24,79,lyrx)
         loop
      ENDIF
   ENDIF
enddo
RETURN
